
//
//  MIDIConfirmCell.m
//  迷笛
//
//  Created by . on 2018/9/14.
//  Copyright © 2018年 🍃🌺🌺🍃. All rights reserved.
//

#import "MIDIConfirmCell.h"

@implementation MIDIConfirmCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        [self addSubview:self.tickname];
        [self.tickname mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self);
            make.left.mas_offset(WidthScale(20));
            [self.tickname setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
        }];
        [self addSubview:self.name];
        [self.name mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self);
            make.left.mas_offset(WidthScale(20));
            make.width.mas_offset(WidthScale(200));
            make.height.mas_offset(HeightScale(44));
        }];
        [self addSubview:self.iPhone];
        [self.iPhone mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self);
            make.left.mas_offset(WidthScale(20));
            make.width.mas_offset(WidthScale(200));
            make.height.mas_offset(HeightScale(44));
        }];
        [self addSubview:self.mainiamge];
        [self.mainiamge mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self);
            make.left.mas_offset(WidthScale(20));
            make.width.mas_offset(WidthScale(93));
            make.height.mas_offset(kDevice_Is_iPhoneX?HeighX(118):HeightScale(118));
        }];
        [self addSubview:self.address];
        [self.address mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.mainiamge).offset(WidthScale(10));
            make.left.equalTo(self.mainiamge.mas_right).offset(WidthScale(10));
            [self.address setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
        }];
        [self addSubview:self.time];
        [self.time mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.address.mas_bottom).offset(WidthScale(10));
            make.left.equalTo(self.mainiamge.mas_right).offset(WidthScale(10));
            [self.time setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
        }];
        [self addSubview:self.RMB];
        [self.RMB mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.time.mas_bottom).offset(WidthScale(10));
            make.left.equalTo(self.mainiamge.mas_right).offset(WidthScale(10));
            [self.RMB setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
        }];
        
        [self addSubview:self.addressimage];
        [self.addressimage mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_offset(WidthScale(15));
            make.left.equalTo(self).offset(WidthScale(16));
            make.width.mas_offset(WidthScale(18));
            make.height.mas_offset(kDevice_Is_iPhoneX?HeighX(18):HeightScale(18));
        }];
        [self addSubview:self.addresslable];
        [self.addresslable mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self);
            make.left.equalTo(self.addressimage.mas_right).offset(WidthScale(16));
            make.width.mas_offset(WidthScale(306));
            make.height.mas_offset(kDevice_Is_iPhoneX?HeighX(36):HeightScale(36));
        }];
        [self addSubview:self.ticketrmb];
        [self.ticketrmb mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self);
            make.left.mas_offset(WidthScale(16));
            [self.ticketrmb setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
        }];
        [self addSubview:self.Yuan];
        [self.Yuan mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self);
            make.right.equalTo(self).mas_offset(WidthScale(-20));
            [self.Yuan setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
        }];
    }
    return self;
}
-(UILabel *)tickname
{
    if (!_tickname)
    {
        _tickname =[[UILabel alloc]init];
//        _tickname.text =@"电子票";
        _tickname.textColor = [UIColor colorWithHexString:@"#FFFFFF"];
        _tickname.font =[UIFont systemFontOfSize:WidthScale(16)];
    }
    return _tickname;
}
-(UITextField *)name
{
    if (!_name)
    {
        _name =[[UITextField alloc]init];
        _name.borderStyle = UITextBorderStyleNone;
    }
    return _name;
}
-(UITextField *)iPhone
{
    if (!_iPhone)
    {
        _iPhone =[[UITextField alloc]init];
        _iPhone.borderStyle = UITextBorderStyleNone;
    }
    return _iPhone;
}
-(UIImageView *)mainiamge
{
    if (!_mainiamge)
    {
        _mainiamge =[[UIImageView alloc]init];
    }
    return _mainiamge;
}
-(UILabel *)address
{
    if (!_address)
    {
        _address =[[UILabel alloc]init];
        _address.textColor = [UIColor colorWithHexString:@"#FFFFFF"];
        _address.font =[UIFont systemFontOfSize:WidthScale(16)];
    }
    return _address;
}
-(UILabel *)time
{
    if (!_time)
    {
        _time =[[UILabel alloc]init];
        _time.textColor = [UIColor colorWithHexString:@"#999999"];
        _time.font =[UIFont systemFontOfSize:WidthScale(12)];
    }
    return _time;
}
-(UILabel *)RMB
{
    if (!_RMB)
    {
        _RMB =[[UILabel alloc]init];
        _RMB.textColor = [UIColor colorWithHexString:@"#FF005D"];
        _RMB.font =[UIFont systemFontOfSize:WidthScale(12)];
    }
    return _RMB;
}
-(UIImageView *)addressimage
{
    if (!_addressimage)
    {
        _addressimage =[[UIImageView alloc]init];
//        _addressimage.image =[UIImage imageNamed:@"huodong-location"];
    }
    return _addressimage;
}
-(UILabel *)addresslable
{
    if (!_addresslable)
    {
        _addresslable = [[UILabel alloc]init];
        _addresslable.textColor = [UIColor colorWithHexString:@"#FFFFFF"];
        _addresslable.font =[UIFont systemFontOfSize:WidthScale(15)];
        _addresslable.numberOfLines = 0;
    }
    return _addresslable;
}
-(UILabel *)ticketrmb
{
    if (!_ticketrmb)
    {
        _ticketrmb = [[UILabel alloc]init];
        _ticketrmb.font = [UIFont systemFontOfSize:WidthScale(14)];
        _ticketrmb.textColor = [UIColor colorWithHexString:@"#FFFFFF"];
        [self.ticketrmb setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
    }
    return _ticketrmb;
}
-(UILabel *)Yuan
{
    if (!_Yuan)
    {
        _Yuan = [[UILabel alloc]init];
        _Yuan.font = [UIFont systemFontOfSize:WidthScale(14)];
        _Yuan.textColor = [UIColor colorWithHexString:@"#FFFFFF"];
        [self.Yuan setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
    }
    return _Yuan;
}
@end
